import { ref } from "vue"

/** 任务统计类型 */
export enum TaskStaticsTypeEnum {
  "CREATED" = "已创建",
  "RUNNING" = "正在运行",
  "FINISHED" = "已完成",
  "ERROR" = "运行错误",
  "STOPPED" = "已停止"
}

/** 表单类型 */
export enum FormTypeEnum {
  CREATE,
  EDIT,
  VIEW
}

/** Tab类型 检测、博弈 */
export enum TabTypeEnum {
  STATIC = "static",
  DYNAMIC = "dynamic"
}

/** Tab类型 强化学习、传统学习 */
export enum AlgoTypeEnum {
  RL = "RL", // 强化学习模型
  ML = "ML" // 传统机器学习
}

/** 快速开始过程 */
export enum QuickStartProcessEnum {
  TrainBY = 1,
  TrainScene,
  TrainSetting,
  TrainStart,
  EvalBY,
  EvalScene,
  EvalSetting,
  EvalStart
}

export type TASK_MODE = "Train" | "Inference"

export const taskModeOptions = ref<{ value: TASK_MODE; name: string }[]>([
  { name: "训练", value: "Train" },
  { name: "评估", value: "Inference" }
])
export const taskStatusOptions = ref<{ value: number; name: string }[]>([
  { value: 0, name: "创建" },
  { value: 1, name: "运行中" },
  { value: 2, name: "结束" },
  { value: 3, name: "错误" },
  { value: 4, name: "暂停" }
])
export const taskTypeOptions = ref<{ value: string; name: string }[]>([
  { name: "博弈任务", value: TabTypeEnum.DYNAMIC },
  { name: "检测任务", value: TabTypeEnum.STATIC }
])
export type TASK_EVAL_INDEX = "perception" | "cognition" | "decision" | "action"
/** 评估指标 */
export const evalIndexOptions = ref<{ value: string; name: string }[]>([
  { name: "感知", value: "perception" },
  { name: "认知", value: "cognition" },
  { name: "决策", value: "decision" },
  { name: "行动", value: "action" }
])
